home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4437 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.3 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Unbuffered character
  5. Date: 4 Feb 1996 08:30:39 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4f2mvfINNm4e@keats.ugrad.cs.ubc.ca>
  8. References: <4f0uul$akt@gail.ripco.com>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <4f0uul$akt@gail.ripco.com>,
  12. Martin Ambuhl <mambuhl@ripco.com> wrote:
  13. >jagrant@emr1.emr.ca (John Grant)
  14. >in <DM2zCI.379@emr1.emr.ca   writes:
  15. >    Lines: 34
  16. >
  17. >    In article <4ep3a1$bee@hacgate2.hac.com      c  llins@thor.tu.hac.com (Ron C
  18. >    rites:
  19. >        There is no portable way to get unbuffered input, since C can't
  20. >        possibly knew all about the dozens or hundreds of different
  21. >        terminal types available on all the machines made around the
  22. >        world.
  23. >
  24. >        For  best results (i.e., least evil alternative), check out the
  25. >        "curses" library available for your machine.  Most common
  26. >        flavors can be had for free from any SimTel mirror.
  27. >
  28. >     Does 'portability' or 'least evil' imply that everything that is
  29. >     not ANSI C be routed through a local version of a UNIX library?
  30. >
  31. >Mr. Grant is, I suppose, continuing his attack on "elitism" with this.
  32. >Since he does not seem to know, and others may not either, there are a
  33. >number of DOS version of curses available.  It is not ANSI C, and is
  34. >often not the best choice for any particular platform.  It is, however,
  35.  
  36. Yep. It's not UNIX elitism that drives one to choose libraries that originated
  37. under UNIX. It's just that these are more often available in freely distributed
  38. form, have more portable semantics, are better documented and supported and
  39. more mature and well-entrenched.
  40.  
  41. Porting {DOS, Mac, Windoze, ...} libraries to ther systems is not always as
  42. easy because they may be peppered with assumptions operating system details,
  43. machine architecture, memory layout and so forth.
  44.  
  45. Sources may not be available, whereas in the UNIX world, cloning proprietary
  46. code with freeware code is common. The GNU project has a freeware replacement
  47. for every major UNIX tool, save for things like OS-specific administration
  48. utilities. Some people want to use these tools on other systems. Entire
  49. libraries are freely available, making them prime candidates for porting for a
  50. programmer who wants cross-platoform functionality. For example, ncurses is a
  51. freeware clone of SVR4 curses. It's a very good quality clone that rivals the
  52. original, too.
  53.  
  54. In a recent project that involves UNIX and Windows platforms, my teammates and
  55. I have had to port quite a few things to Windows/Winsock that have no
  56. equivalent in the 16-bit world; XDR (for encapsulating data structures in a
  57. machine-independent manner) and LibDES (DES encryption) come to mind.
  58.  
  59. I don't see how any of this is a form of elitism. When someone hands me quality
  60. freeware source code for my benefit, I'd hardly call him an elitist.  If he
  61. required me to attend a $2000 seminar and sign up with a support network before
  62. certifying me to use his product, forced me to buy documentation, development
  63. tools and license the code---then I would call him an elitist.
  64.  
  65. >widely available on almost all platforms and performs adequately for
  66. >most tasks.  It is a 'least evil' because it is the closest we have to a
  67. >portable solution.
  68.  
  69. Right.
  70. -- 
  71.  
  72.